package tsg.util;

public class Dimension 
{
	public static final int PIXELS 		= 1;
	public static final int PERCENT		= 2;
	
	/**
	 * 
	 */
	public Dimension()
	{
		
	}
	
	/**
	 * 
	 * @param width
	 * @param height
	 */
	public Dimension(int width, int height)
	{
		this.setWidth	(width);
		this.setHeight	(height);
	}
	
	/**
	 * 
	 * @param dimension
	 */
	public Dimension(Dimension dimension)
	{
		this.setWidth	(dimension.getWidth());
		this.setHeight	(dimension.getHeight());
	}
	
	/**
	 * 
	 * @param width
	 * @param height
	 */
	public void setSize(int width, int height)
	{
		this.setWidth	(width);
		this.setHeight	(height);
	}
	
	/**
	 * 
	 * @return
	 */
	public int getWidth()
	{
		return _width;
	}
	
	/**
	 * 
	 * @param width
	 */
	public void setWidth(int width)
	{
		_width = width;
	}
	
	/**
	 * 
	 * @return
	 */
	public int getHeight()
	{
		return _height;
	}
	
	/**
	 * 
	 * @param height
	 */
	public void setHeight(int height)
	{
		_height = height;
	}
	
	/**
	 * 
	 * @param dimension
	 * @return_layoutManager
	 */
	public boolean equals(Dimension dimension)
	{
		boolean result = false;
		
		if(	dimension.getWidth() 	== this.getWidth() 	&&
			dimension.getHeight() 	== this.getHeight()	)
		{
			result = true;
		}
		
		return result;
	}
	
	/**
	 * 
	 * @return
	 */
	public int getUnits()
	{
		return _units;
	}
	
	/**
	 * 
	 * @param units
	 */
	public void setUnits(int units)
	{
		_units = units;
	}
	
	/**
	 * 
	 * @return
	 */
	public boolean getFillParent()
	{
		return _fillParent;
	}
	
	
	/**
	 * 
	 * @param fillParent
	 */
	public void setFillParent(boolean fillParent)
	{
		_fillParent = fillParent;
	}

	private int 	_width		= 0;
	private int 	_height 	= 0;
	private int 	_units		= PIXELS;
	private boolean _fillParent = false;
}
